{% load i18n %}
<script type="text/javascript">
    var g_chooserShowing = false;
    function toggleLanguageChooser() {
        var chooser = document.getElementById('language_chooser');
        if (chooser) {
            chooser.style.display = g_chooserShowing ? 'none' : '';
            g_chooserShowing = !g_chooserShowing
        }
    }    
</script>
<div class="menu_top">
    <div id="sub">
        {% if user %}
                {% if user.email %}
                    <b>{{ user.email }}</b> |
                {% endif %}
                    <a href="/user">{% trans "My Account" %}</a> |
                {% if user_is_admin %}
                    <a href='/admin'>{% trans "System Configuration" %}</a> |
                    <a href='http://appengine.google.com/' target="_blank">Appengine</a> |
                {% endif %}
            <a href="/logout">{% trans "Sign out" %}</a> |
        {% else %}
            <a href="/signup">{% trans "Join now" %}</a> |
            {% trans "Already a user?" %} <a href="/login">{% trans "Sign in" %}</a> |
        {% endif %}
        <a href="javascript:toggleLanguageChooser();">
            <img src="/img/globe_icon.png" style="padding-right: 4px;" width="16" align="absmiddle"
                 height="16">
            <span>English</span><small>&#9660;</small>
        </a>
        <div id="language_chooser" style="display: none;">
        </div>
    </div>
    <div id="header">
        <div id="main">
	        <div id="next2logo">
				<h1>
				<a href="/">{{BLOG.title}}</a>
				</h1>
			</div>
        </div>
    </div>
    <div id="navpanel">
    <div id ="nav-left" style="display:block;">
    <ul>
         {% for menu in nav_menus %}
           <li><a href="{{menu.permalink}}" target="{{menu.target}}"><span>{{menu.title}}</span></a></li>
         {% endfor %}
         
    </ul>
    </div>
    </div>
    
    <!-- 
    <div>
       <script type="text/JavaScript"> 
		alimama_pid="mm_10853757_1695699_6614648"; 
		alimama_titlecolor="0000FF"; 
		alimama_descolor ="000000"; 
		alimama_bgcolor="FFFFFF"; 
		alimama_bordercolor="E6E6E6"; 
		alimama_linkcolor="008000"; 
		alimama_bottomcolor="FFFFFF"; 
		alimama_anglesize="0"; 
		alimama_bgpic="0"; 
		alimama_icon="0"; 
		alimama_sizecode="15"; 
		alimama_width=950; 
		alimama_height=90; 
		alimama_type=2; 
		</script> 
		<script src="http://a.alimama.cn/inf.js" type=text/javascript> 
		</script>
    </div>
	 -->
</div>
